load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "heap",
    srcs = ["heap.go"],
    importpath = "github.com/pingcap/tidb/pkg/statistics/handle/autoanalyze/internal/heap",
    visibility = ["//pkg/statistics/handle/autoanalyze:__subpackages__"],
    deps = ["@com_github_pingcap_errors//:errors"],
)

go_test(
    name = "heap_test",
    timeout = "short",
    srcs = ["heap_test.go"],
    embed = [":heap"],
    flaky = True,
    shard_count = 14,
    deps = ["@com_github_stretchr_testify//require"],
)
